/**
 * @description 插入排序算法
 */
Array.prototype.insertionSort = function (){
    for (let i = 1; i < this.length; i++) {
        const tmp = this[i];
        let j = i;
        while (j > 0){
            if (this[j-1] > tmp){
                this[j] = this[j-1];
            }else {
                break;
            }
            j -= 1;
        }
        this[j] = tmp;
    }
};

//时间复杂度：O(n^2)